/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.messages.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 报文查询Entity
 * @author 报文查询
 * @version 2017-06-13
 */
public class EleEquipmentMessages extends DataEntity<EleEquipmentMessages> {
	
	private static final long serialVersionUID = 1L;
	private String mac;		// MAC地址
	private String forrequest;		// 对应请求报文的Id
	private String method;		// 方法
	private String type;		// 请求/返回
	private String code;		// 结果
	private String data;		// 数据
	private Date time;		// 时间
	
	public EleEquipmentMessages() {
		super();
	}

	public EleEquipmentMessages(String id){
		super(id);
	}

	@Length(min=0, max=255, message="MAC地址长度必须介于 0 和 255 之间")
	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}
	
	@Length(min=0, max=100, message="对应请求报文的Id长度必须介于 0 和 100 之间")
	public String getForrequest() {
		return forrequest;
	}

	public void setForrequest(String forrequest) {
		this.forrequest = forrequest;
	}
	
	@Length(min=0, max=255, message="方法长度必须介于 0 和 255 之间")
	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}
	
	@Length(min=0, max=255, message="请求/返回长度必须介于 0 和 255 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=255, message="结果长度必须介于 0 和 255 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}
	
}